@extends('layouts.app')
@section('title', '权限设置')

@section('content')
    <div class="tab">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <table class="table table-striped">
                        <caption>员工账号信息管理</caption>
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>权限名称</th>
                            <th>权限别名</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($list as $v)
                            <tr id="{{$v->id}}">
                                <td>{{$v->id}}</td>
                                <td>{{$v->name}}</td>
                                <td>{{$v->desc_name}}</td>
                                <td>
                                    <a class="update btn btn-info pull-left" href="{{ route('permissions.edit', [$v->id]) }}" >编辑</a>
                                    <form action="{{ route('permissions.destroy', [$v->id]) }}" method="post" class="pull-left">
                                        {{ csrf_field() }}
                                        {{ method_field('DELETE') }}
                                        <button type="submit" class="btn btn-danger">删除</button>
                                    </form>
                                </td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                    {{--<a class="pull-right btn btn-primary" href="{{ route('users.create') }}">添加员工</a>--}}
                </div>
            </div>
            <a class="update btn btn-info" href="{{ route('permissions.create') }}" >添加权限</a>
            <div class="row">
                <div class="col-md-12">
                    <div class="text-center">
                        {{$list->render()}}
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

